public class SterDemo {
    public static void main(String[] args) {
        //乘法运算
        System.out.println(5/2);//2
        System.out.println((float) 5/2);//2.5
        System.out.println(5/(float)2);//2.5
        System.out.println((float) (5/2));//2
        //模运算
        System.out.println(10%3);//1
        System.out.println(10%-3);//1
        System.out.println(-10%3);//-1
        System.out.println(-10%-3);//-1

        System.out.println(11.5%2);//1.5

        //增量运算符
        int a = 10;
        ++a;//a = a +1
        System.out.println(a);

        int c = 10;
        c+=1;//a = a +1
        System.out.println(c);


        short b =10;
        b +=1;//帮助了强制类型转换
        System.out.println(b);

        int d = 10;
        int q = d++;// 后置先运行 q = d 然后在d++，所以q=10 d =11
        System.out.println(d);
        System.out.println(q);

        System.out.println(1<5);//小于
        System.out.println(1<=5);//小于等于
        System.out.println(1>=5);//大于等于
        System.out.println(1!=5);//等于
        System.out.println(1==5);//是否等于


    }
}
